package com.ys.enume.sys;

public class YsGridButtonEnum {
	// 字段类型
	public enum StyleType {
		BLUE("蓝色", 1, "ys-grid-btn-add"),
		GREEN("绿色", 2, "ys-grid-btn-edit"),
		RED("红色", 3, "ys-grid-btn-delete"),
		YELLOW("黄色", 4, "ys-grid-btn-warn");
		public String name;
		public Integer value;
		public String nameStyle;

		private StyleType(String name, Integer value, String nameStyle) {
			this.name = name;
			this.value = value;
			this.nameStyle = nameStyle;
		}

		public static String getNameStyle(Integer value) {
			for (StyleType e : StyleType.values()) {
				if (e.value == value) {
					return e.nameStyle;
				}
			}

			return "";
		}
	}
}
